/*
 * @Author: scl
 * @Date: 2023-09-14 17:18:02
 * @LastEditTime: 2023-09-15 14:32:29
 * @Description: file content
 */
import { http } from '@/utils/http'
import type { bannerItem } from '@/types/home';
import type { categoryPanelItem } from '@/types/home';
import type { hotPanelItem } from '@/types/home';
import type { guessItem } from '@/types/home';
import type { PageResult } from '@/types/global';
import type { pageParams } from '@/types/global';

export const getBannerAPI = (distributionSite = 1) => {
    return http<bannerItem[]>({
        url: '/home/banner',
        method: 'GET',
        data: {
            distributionSite,
        }
    })
}
export const getCategoryPanelAPI = () => {
    return http<categoryPanelItem[]>({
        url: "/home/category/mutli",
        method: "GET"
    })
}
export const getHotPanelAPI = () => {
    return http<hotPanelItem[]>({
        url: "/home/hot/mutli",
        method: "GET",
        header: {
            "source-client": "miniapp"
        }
    })
}
export const getGuessAPI = (data?: pageParams) => {
    return http<PageResult<guessItem>>({
        url: "/home/goods/guessLike",
        method: "GET",
        data
    })
}